package com.wuyou.designPatterns.mediator;

import java.awt.*;

/**
 * 按钮成员
 *
 * @Date 2024/10/14 16:16
 * @Author 无忧
 */
public class ColleagueButton extends Button implements Colleague {

    private Mediator mediator;

    public ColleagueButton(String caption){
        super(caption);
    }

    @Override
    public void setMediator(Mediator mediator) {
        this.mediator = mediator;
    }

    @Override
    public void setColleagueEnabled(boolean enabled) {
        System.out.println(enabled);
        setEnabled(enabled);
    }
}
